public abstract class Employee {
    protected String name;
    protected String empId;

    public Employee(String name, String empId) {
        this.name = name;
        this.empId = empId;
    }

    public abstract double calculateSalary() throws Exception;

    public String generateSalarySlip() throws Exception {
        return "工号：" + empId + "，姓名：" + name + "，薪资：" + calculateSalary();
    }
}
